#pragma once

#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
#include<assert.h>

#define N 4
#define MaxSize 50

typedef int ElemType;
typedef struct TupNode
{
	int r;
	int c;
	ElemType d;
}TupNode;
typedef struct TSMatrix
{
	int rows;
	int cols;
	int nums;
	TupNode data[MaxSize];
}TSMatrix;

void CreateMat(TSMatrix* qt, ElemType** arr);
void DispMat(TSMatrix qt);
void TranMat(TSMatrix qt1, TSMatrix* qt2);
bool MatAdd(TSMatrix a, TSMatrix b, TSMatrix* c);
int GetValue(TSMatrix qt, int i, int j);
bool MatMul(TSMatrix a, TSMatrix b, TSMatrix* c);